<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div style="height:5000px"></div>
</body>
<script src="debounce.js"></script>
<script>

    let scroll = function(a){
        console.log(+new Date(),a)
    }
    let scrollDeb = debounce(scroll,50)

    window.addEventListener('scroll',function(){
        scrollDeb(1000)
    })
</script>
</html>